<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/admin.css" />
	<script type='text/javascript' src='__PUBLIC__/js/jquery.min.js'></script>
	<script type='text/javascript' src='__PUBLIC__/layer/layer.js'></script>
	<script type='text/javascript' src='__PUBLIC__/admin/js/common.js'></script>
    <title>后台管理</title>
</head>
<body>
<div class="main-container clearfix"><div class="main-content"><div class="inner"><div class="mall-manage">
    <div class="comm-list" style="min-height:600px">
        <div class="comm-top">
            <div class="title-left">
                数据列表
            </div>
            <div class="title-right" style="top:8px;">
            <form method="get" action="<{:U('index')}>">
                <input type="hidden" name="m" value="<{:MODULE_NAME}>" />
                <input type="hidden" name="c" value="<{:CONTROLLER_NAME}>" />
                <input type="hidden" name="a" value="<{:ACTION_NAME}>" />
                <input name="keywords" class="textarea search_inp" placeholder="请输入关键词" type="text" value="<{:I('get.keywords')}>"/>
                <input value="搜索" class="btn btn-success search_btn" type="submit" />
                <input value="添加医院" class="btn btn-success search_btn" type="button" onclick="location.href='<{:U('edit')}>'" />
            </form>
            </div>
        </div>
        <div class="list-table">
            <div class="wrapper">
                <table class="stable">
                    <thead>
                        <tr>
                            <th>医院名</th>
                            <th>所在市</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <foreach name="list" item="v">
                            <tr>
                                <td><{$v.name}></td>
                                <td><{$cityRow[$v['cid']]}></td>
                                <td><div class="btn-operate">
                                    <a href="<{:U('edit',array('id'=>$v['id']))}>" title="修改"><i class="glyphicon glyphicon-edit"></i></a>
                                    <a href="javascript:void(0);" onclick="delRow('<{$v.id}>',this)" title="删除" id="delBtn<{$v.id}>"><i class="glyphicon glyphicon-trash"></i></a>
                                </div></td>
                            </tr>
                        </foreach>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="page-list"><{$page}></div>
    </div>
</div></div></div></div>
<script type="text/javascript">
function delRow(id,obj){
    if(confirm('确定要删除吗？')){
        $.post("<{:U('del')}>",{id:id},function(res){
            res=$.trim(res);
            if(res=='suc'){
                note_info('删除成功',obj);
                setTimeout('location.reload()',1200);
            }else{
                note_info('删除失败',obj,'warn');
            }
        });
    }
}
</script>
</body>
</html>